package com.zgg.files.controller;


import com.alibaba.fastjson.JSONObject;
import com.zgg.base.BaseController;
import com.zgg.files.service.OrderFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RequestMapping("/tools")
@RestController
public class ToolsController extends BaseController {

    @Autowired
    private OrderFileService orderFileService;

    @ResponseBody
    @RequestMapping(value = "/dataMigrate/{dfsType}/{num}", method = RequestMethod.POST)
    public JSONObject uploadFiles(HttpServletRequest request,
                                  //   dfsType区分dfs类型
                                  @RequestParam(value = "dfsType") String dfsType,
                                  @RequestParam(value = "num", required = false) Integer num) {
        JSONObject jsonObject = null;
        if (dfsType.equals("fastdfs")) {
            // TODO: 2018/10/8  fastdfs下载功能 
        }
        if (dfsType.equals("nfs")) {
            // TODO: 2018/10/8 nfs下载功能
        }

        if (num == null || num == 0) {
            num = 1000;
        }
//        orderFileService.getOrderFileListByParam()

        return null;
    }
}
